/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "init.h"

#include "引擎.h"

#include <file_文件名数据.h>
#include <file_载入保存数据.h>

#include "物体编辑/视口辅助物体.h"


void f_init_Engine() {
	S_框架::init();
	//f_input_打开设备();
	
}

void f_release_Engine() {
	
	S_框架::close();
}

void f_init_Frame() {

	S_框架::engine->m_当前更新场景 = f_NodeCtx_get默认场景();
	//S_框架::g_场景渲染环境 = new C_场景渲染环境(*S_节点框架::g_3D视口环境);

	f_scene_创建世界(f_NodeCtx_get默认场景());

}

void f_init_辅助物体() {
	S_框架::g_基准网格线 = f_辅助物体_创建基准网格(*S_节点框架::g_3D视口环境);
	S_框架::g_场景方向轴 = f_辅助物体_创建世界方向轴(*S_节点框架::g_3D视口环境);

	f_辅助物体_创建移动变换手柄(*S_节点框架::g_3D视口环境);
	f_辅助物体_创建旋转变换手柄(*S_节点框架::g_3D视口环境);
	f_辅助物体_创建缩放变换手柄(*S_节点框架::g_3D视口环境);

	S_框架::g_场景辅助物体.push_back(S_框架::g_基准网格线);
	S_框架::g_场景辅助物体.push_back(S_框架::g_场景方向轴);
	
	f_bm_刷新缓存到GPU();
}







